home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1999 July: Mac OS SDK / Dev.CD Jul 99 SDK1.toast / Development Kits / Mac OS / Interfaces&Libraries / Universal / Interfaces / AIncludes / QD3DGroup.a < prev    next >
Encoding:
Text File  |  1998-08-17  |  13.3 KB  |  461 lines  |  [TEXT/MPS ]

  1. ;
  2. ;    File:        QD3DGroup.a
  3. ;
  4. ;    Contains:    Q3Group methods        
  5. ;
  6. ;    Version:    Technology:    Quickdraw 3D 1.5.4
  7. ;                Release:    Universal Interfaces 3.2
  8. ;
  9. ;    Copyright:    © 1995-1998 by Apple Computer, Inc., all rights reserved.
  10. ;
  11. ;    Bugs?:        For bug reports, consult the following page on
  12. ;                the World Wide Web:
  13. ;
  14. ;                    http://developer.apple.com/bugreporter/
  15. ;
  16. ;
  17.     IF &TYPE('__QD3DGROUP__') = 'UNDEFINED' THEN
  18. __QD3DGROUP__ SET 1
  19.  
  20.     IF &TYPE('__QD3D__') = 'UNDEFINED' THEN
  21.     include 'QD3D.a'
  22.     ENDIF
  23.  
  24. ; ******************************************************************************
  25. ; **                                                                             **
  26. ; **                            Group Typedefs                                     **
  27. ; **                                                                             **
  28. ; ****************************************************************************
  29.  
  30. ; * These flags affect how a group is traversed
  31. ; * They apply to when a group is "drawn", "picked", "bounded", "written"
  32.  
  33.  
  34. ; typedef long                            TQ3DisplayGroupStateMasks
  35. kQ3DisplayGroupStateNone        EQU        0
  36. kQ3DisplayGroupStateMaskIsDrawn    EQU        $01
  37. kQ3DisplayGroupStateMaskIsInline EQU    $02
  38. kQ3DisplayGroupStateMaskUseBoundingBox EQU $04
  39. kQ3DisplayGroupStateMaskUseBoundingSphere EQU $08
  40. kQ3DisplayGroupStateMaskIsPicked EQU    $10
  41. kQ3DisplayGroupStateMaskIsWritten EQU    $20
  42. ; typedef unsigned long                 TQ3DisplayGroupState
  43.  
  44. ; ******************************************************************************
  45. ; **                                                                             **
  46. ; **                    Group Routines (apply to all groups)                     **
  47. ; **                                                                             **
  48. ; ****************************************************************************
  49.  
  50. ;
  51. ; extern TQ3GroupObject Q3Group_New(void )
  52. ;
  53.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  54.         IMPORT_CFM_FUNCTION Q3Group_New
  55.     ENDIF
  56.  
  57. ;
  58. ; extern TQ3ObjectType Q3Group_GetType(TQ3GroupObject group)
  59. ;
  60.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  61.         IMPORT_CFM_FUNCTION Q3Group_GetType
  62.     ENDIF
  63.  
  64. ;
  65. ; extern TQ3GroupPosition Q3Group_AddObject(TQ3GroupObject group, TQ3Object object)
  66. ;
  67.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  68.         IMPORT_CFM_FUNCTION Q3Group_AddObject
  69.     ENDIF
  70.  
  71. ;
  72. ; extern TQ3GroupPosition Q3Group_AddObjectBefore(TQ3GroupObject group, TQ3GroupPosition position, TQ3Object object)
  73. ;
  74.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  75.         IMPORT_CFM_FUNCTION Q3Group_AddObjectBefore
  76.     ENDIF
  77.  
  78. ;
  79. ; extern TQ3GroupPosition Q3Group_AddObjectAfter(TQ3GroupObject group, TQ3GroupPosition position, TQ3Object object)
  80. ;
  81.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  82.         IMPORT_CFM_FUNCTION Q3Group_AddObjectAfter
  83.     ENDIF
  84.  
  85. ;
  86. ; extern TQ3Status Q3Group_GetPositionObject(TQ3GroupObject group, TQ3GroupPosition position, TQ3Object *object)
  87. ;
  88.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  89.         IMPORT_CFM_FUNCTION Q3Group_GetPositionObject
  90.     ENDIF
  91.  
  92. ;
  93. ; extern TQ3Status Q3Group_SetPositionObject(TQ3GroupObject group, TQ3GroupPosition position, TQ3Object object)
  94. ;
  95.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  96.         IMPORT_CFM_FUNCTION Q3Group_SetPositionObject
  97.     ENDIF
  98.  
  99. ;
  100. ; extern TQ3Object Q3Group_RemovePosition(TQ3GroupObject group, TQ3GroupPosition position)
  101. ;
  102.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  103.         IMPORT_CFM_FUNCTION Q3Group_RemovePosition
  104.     ENDIF
  105.  
  106. ;
  107. ; extern TQ3Status Q3Group_GetFirstPosition(TQ3GroupObject group, TQ3GroupPosition *position)
  108. ;
  109.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  110.         IMPORT_CFM_FUNCTION Q3Group_GetFirstPosition
  111.     ENDIF
  112.  
  113. ;
  114. ; extern TQ3Status Q3Group_GetLastPosition(TQ3GroupObject group, TQ3GroupPosition *position)
  115. ;
  116.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  117.         IMPORT_CFM_FUNCTION Q3Group_GetLastPosition
  118.     ENDIF
  119.  
  120. ;
  121. ; extern TQ3Status Q3Group_GetNextPosition(TQ3GroupObject group, TQ3GroupPosition *position)
  122. ;
  123.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  124.         IMPORT_CFM_FUNCTION Q3Group_GetNextPosition
  125.     ENDIF
  126.  
  127. ;
  128. ; extern TQ3Status Q3Group_GetPreviousPosition(TQ3GroupObject group, TQ3GroupPosition *position)
  129. ;
  130.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  131.         IMPORT_CFM_FUNCTION Q3Group_GetPreviousPosition
  132.     ENDIF
  133.  
  134. ;
  135. ; extern TQ3Status Q3Group_CountObjects(TQ3GroupObject group, unsigned long *nObjects)
  136. ;
  137.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  138.         IMPORT_CFM_FUNCTION Q3Group_CountObjects
  139.     ENDIF
  140.  
  141. ;
  142. ; extern TQ3Status Q3Group_EmptyObjects(TQ3GroupObject group)
  143. ;
  144.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  145.         IMPORT_CFM_FUNCTION Q3Group_EmptyObjects
  146.     ENDIF
  147.  
  148. ; *     Typed Access
  149.  
  150. ;
  151. ; extern TQ3Status Q3Group_GetFirstPositionOfType(TQ3GroupObject group, TQ3ObjectType isType, TQ3GroupPosition *position)
  152. ;
  153.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  154.         IMPORT_CFM_FUNCTION Q3Group_GetFirstPositionOfType
  155.     ENDIF
  156.  
  157. ;
  158. ; extern TQ3Status Q3Group_GetLastPositionOfType(TQ3GroupObject group, TQ3ObjectType isType, TQ3GroupPosition *position)
  159. ;
  160.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  161.         IMPORT_CFM_FUNCTION Q3Group_GetLastPositionOfType
  162.     ENDIF
  163.  
  164. ;
  165. ; extern TQ3Status Q3Group_GetNextPositionOfType(TQ3GroupObject group, TQ3ObjectType isType, TQ3GroupPosition *position)
  166. ;
  167.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  168.         IMPORT_CFM_FUNCTION Q3Group_GetNextPositionOfType
  169.     ENDIF
  170.  
  171. ;
  172. ; extern TQ3Status Q3Group_GetPreviousPositionOfType(TQ3GroupObject group, TQ3ObjectType isType, TQ3GroupPosition *position)
  173. ;
  174.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  175.         IMPORT_CFM_FUNCTION Q3Group_GetPreviousPositionOfType
  176.     ENDIF
  177.  
  178. ;
  179. ; extern TQ3Status Q3Group_CountObjectsOfType(TQ3GroupObject group, TQ3ObjectType isType, unsigned long *nObjects)
  180. ;
  181.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  182.         IMPORT_CFM_FUNCTION Q3Group_CountObjectsOfType
  183.     ENDIF
  184.  
  185. ;
  186. ; extern TQ3Status Q3Group_EmptyObjectsOfType(TQ3GroupObject group, TQ3ObjectType isType)
  187. ;
  188.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  189.         IMPORT_CFM_FUNCTION Q3Group_EmptyObjectsOfType
  190.     ENDIF
  191.  
  192. ; *    Determine position of objects in a group
  193.  
  194. ;
  195. ; extern TQ3Status Q3Group_GetFirstObjectPosition(TQ3GroupObject group, TQ3Object object, TQ3GroupPosition *position)
  196. ;
  197.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  198.         IMPORT_CFM_FUNCTION Q3Group_GetFirstObjectPosition
  199.     ENDIF
  200.  
  201. ;
  202. ; extern TQ3Status Q3Group_GetLastObjectPosition(TQ3GroupObject group, TQ3Object object, TQ3GroupPosition *position)
  203. ;
  204.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  205.         IMPORT_CFM_FUNCTION Q3Group_GetLastObjectPosition
  206.     ENDIF
  207.  
  208. ;
  209. ; extern TQ3Status Q3Group_GetNextObjectPosition(TQ3GroupObject group, TQ3Object object, TQ3GroupPosition *position)
  210. ;
  211.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  212.         IMPORT_CFM_FUNCTION Q3Group_GetNextObjectPosition
  213.     ENDIF
  214.  
  215. ;
  216. ; extern TQ3Status Q3Group_GetPreviousObjectPosition(TQ3GroupObject group, TQ3Object object, TQ3GroupPosition *position)
  217. ;
  218.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  219.         IMPORT_CFM_FUNCTION Q3Group_GetPreviousObjectPosition
  220.     ENDIF
  221.  
  222.  
  223. ; ******************************************************************************
  224. ; **                                                                             **
  225. ; **                            Group Subclasses                                 **
  226. ; **                                                                             **
  227. ; ****************************************************************************
  228.  
  229. ;
  230. ; extern TQ3GroupObject Q3LightGroup_New(void )
  231. ;
  232.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  233.         IMPORT_CFM_FUNCTION Q3LightGroup_New
  234.     ENDIF
  235.  
  236. ;
  237. ; extern TQ3GroupObject Q3InfoGroup_New(void )
  238. ;
  239.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  240.         IMPORT_CFM_FUNCTION Q3InfoGroup_New
  241.     ENDIF
  242.  
  243. ; ******************************************************************************
  244. ; **                                                                             **
  245. ; **                        Display Group Routines                                 **
  246. ; **                                                                             **
  247. ; ****************************************************************************
  248.  
  249. ;
  250. ; extern TQ3GroupObject Q3DisplayGroup_New(void )
  251. ;
  252.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  253.         IMPORT_CFM_FUNCTION Q3DisplayGroup_New
  254.     ENDIF
  255.  
  256. ;
  257. ; extern TQ3ObjectType Q3DisplayGroup_GetType(TQ3GroupObject group)
  258. ;
  259.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  260.         IMPORT_CFM_FUNCTION Q3DisplayGroup_GetType
  261.     ENDIF
  262.  
  263. ;
  264. ; extern TQ3Status Q3DisplayGroup_GetState(TQ3GroupObject group, TQ3DisplayGroupState *state)
  265. ;
  266.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  267.         IMPORT_CFM_FUNCTION Q3DisplayGroup_GetState
  268.     ENDIF
  269.  
  270. ;
  271. ; extern TQ3Status Q3DisplayGroup_SetState(TQ3GroupObject group, TQ3DisplayGroupState state)
  272. ;
  273.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  274.         IMPORT_CFM_FUNCTION Q3DisplayGroup_SetState
  275.     ENDIF
  276.  
  277. ;
  278. ; extern TQ3Status Q3DisplayGroup_Submit(TQ3GroupObject group, TQ3ViewObject view)
  279. ;
  280.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  281.         IMPORT_CFM_FUNCTION Q3DisplayGroup_Submit
  282.     ENDIF
  283.  
  284. ; ******************************************************************************
  285. ; **                                                                             **
  286. ; **        Ordered Display Group                                                  **
  287. ; **                                                                             **
  288. ; **        Ordered display groups keep objects in order by the type of object:     **
  289. ; **                                                                             **
  290. ; **        1    kQ3ShapeTypeTransform                                             **
  291. ; **        2    kQ3ShapeTypeStyle                                                  **
  292. ; **        3    kQ3SetTypeAttribute                                                  **
  293. ; **        4    kQ3ShapeTypeShader                                                  **
  294. ; **        5    kQ3ShapeTypeCamera                                                  **
  295. ; **        6    kQ3ShapeTypeLight                                                  **
  296. ; **        7    kQ3ShapeTypeGeometry                                             **
  297. ; **        8    kQ3ShapeTypeGroup                                                 **            
  298. ; **        9    kQ3ShapeTypeUnknown                                                 **
  299. ; **                                                                             **
  300. ; **        Within a type, you are responsible for keeping things in order.         **
  301. ; **                                                                             **
  302. ; **        You may access and/or manipulate the group using the above types      **
  303. ; **        (fast), or you may use any parent or leaf class types (slower).         **
  304. ; **                                                                             **
  305. ; **        Additional types will be added as functionality grows.                 **
  306. ; **                                                                             **
  307. ; **        The group calls which access by type are much faster for ordered     ** 
  308. ; **        display group for the types above.                                     **
  309. ; **                                                                             **
  310. ; **        N.B. In QuickDraw 3D 1.0 Lights and Cameras are a no-op when drawn.     **
  311. ; **                                                                             **
  312. ; ****************************************************************************
  313.  
  314. ;
  315. ; extern TQ3GroupObject Q3OrderedDisplayGroup_New(void )
  316. ;
  317.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  318.         IMPORT_CFM_FUNCTION Q3OrderedDisplayGroup_New
  319.     ENDIF
  320.  
  321. ; ******************************************************************************
  322. ; **                                                                             **
  323. ; **        IO Proxy Display Group                                                  **
  324. ; **                                                                             **
  325. ; **        IO Proxy display groups are used to place more than one              **
  326. ; **        representation of an object in a metafile. For example, if you know     **
  327. ; **        another program does not understand NURBPatches but does understand  **
  328. ; **        Meshes, you may place a mesh and a NURB Patch in an IO Proxy Group,  **
  329. ; **        and the reading program will select the desired representation.         **
  330. ; **                                                                             **
  331. ; **        Objects in an IO Proxy Display Group are placed in their preferencial**
  332. ; **        order, with the FIRST object being the MOST preferred, the LAST      **
  333. ; **        object the least preferred.                                             **
  334. ; **                                                                             **
  335. ; **        The behavior of an IO Proxy Display Group is that when drawn/picked/ **
  336. ; **        bounded, the first object in the group that is not "Unknown" is used,**
  337. ; **        and the other objects ignored.                                         **
  338. ; **                                                                             **
  339. ; ****************************************************************************
  340.  
  341. ;
  342. ; extern TQ3GroupObject Q3IOProxyDisplayGroup_New(void )
  343. ;
  344.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  345.         IMPORT_CFM_FUNCTION Q3IOProxyDisplayGroup_New
  346.     ENDIF
  347.  
  348. ; ******************************************************************************
  349. ; **                                                                             **
  350. ; **                        Group Extension Definitions                             **
  351. ; **                                                                             **
  352. ; ****************************************************************************
  353.  
  354. ; *    Searching methods - OPTIONAL
  355.  
  356.  
  357. kQ3XMethodType_GroupAcceptObject EQU    'gaco'
  358.  
  359. kQ3XMethodType_GroupAddObject    EQU        'gado'
  360.  
  361. kQ3XMethodType_GroupAddObjectBefore EQU    'gaob'
  362.  
  363. kQ3XMethodType_GroupAddObjectAfter EQU    'gaoa'
  364.  
  365. kQ3XMethodType_GroupSetPositionObject EQU 'gspo'
  366.  
  367. kQ3XMethodType_GroupRemovePosition EQU    'grmp'
  368. ; *    Searching methods - OPTIONAL - default uses above methods
  369.  
  370.  
  371. kQ3XMethodType_GroupGetFirstPositionOfType EQU 'gfrt'
  372.  
  373. kQ3XMethodType_GroupGetLastPositionOfType EQU 'glst'
  374.  
  375. kQ3XMethodType_GroupGetNextPositionOfType EQU 'gnxt'
  376.  
  377. kQ3XMethodType_GroupGetPrevPositionOfType EQU 'gpvt'
  378.  
  379. kQ3XMethodType_GroupCountObjectsOfType EQU 'gcnt'
  380.  
  381. kQ3XMethodType_GroupEmptyObjectsOfType EQU 'geot'
  382.  
  383. kQ3XMethodType_GroupGetFirstObjectPosition EQU 'gfop'
  384.  
  385. kQ3XMethodType_GroupGetLastObjectPosition EQU 'glop'
  386.  
  387. kQ3XMethodType_GroupGetNextObjectPosition EQU 'gnop'
  388.  
  389. kQ3XMethodType_GroupGetPrevObjectPosition EQU 'gpop'
  390. ; *    Group Position Methods
  391. ; *    
  392.  
  393.  
  394. kQ3XMethodType_GroupPositionSize EQU    'ggpz'
  395. ; typedef unsigned long                 TQ3XMethodTypeGroupPositionSize
  396.  
  397.  
  398. kQ3XMethodType_GroupPositionNew    EQU        'ggpn'
  399.  
  400. kQ3XMethodType_GroupPositionCopy EQU    'ggpc'
  401.  
  402. kQ3XMethodType_GroupPositionDelete EQU    'ggpd'
  403. ; *    View Drawing Helpers
  404. ; *    
  405. ; *    TQ3XGroupStartIterateMethod
  406. ; *
  407. ; *        Pass back *object = NULL to NOT call EndIterate iterate
  408. ; *        Pass back *object != NULL to draw object
  409. ; *         (other side will pass it to EndIterate for deletion!)
  410. ; *
  411. ; *        *iterator is uninitialized, use for iteration state. Caller should 
  412. ; *         ignore it.
  413. ; *    
  414. ; *    TQ3XGroupEndIterateMethod
  415. ; *    
  416. ; *        *object is previous object, dispose it or play with it.
  417. ; *        Pass back NULL when last iteration has occurred
  418. ; *        *iterator is previous value, use for iteration state Caller should 
  419. ; *        ignore it.
  420.  
  421.  
  422. kQ3XMethodType_GroupStartIterate EQU    'gstd'
  423.  
  424. kQ3XMethodType_GroupEndIterate    EQU        'gitd'
  425. ; *    IO  Helpers
  426. ; *    
  427. ; *    TQ3XGroupEndReadMethod
  428. ; *        Called when a group has been completely read. Group should perform
  429. ; *        validation and clean up any reading caches.
  430.  
  431.  
  432. kQ3XMethodType_GroupEndRead        EQU        'gerd'
  433. ;
  434. ; extern void *Q3XGroup_GetPositionPrivate(TQ3GroupObject group, TQ3GroupPosition position)
  435. ;
  436.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  437.         IMPORT_CFM_FUNCTION Q3XGroup_GetPositionPrivate
  438.     ENDIF
  439.  
  440.  
  441.  
  442.  
  443.     ENDIF ; __QD3DGROUP__ 
  444.  
  445.